Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added token, refreshToken cookieName option #654

Merged
merged 8 commits into from
Feb 29, 2024

Conversation

FAL-coffee
Copy link
Contributor

@FAL-coffee FAL-coffee commented Feb 2, 2024

Closes #650 .


Allow the user to change the property name where tokens are stored in the cookie when using local or refresh types.


Why this is needed:
Conflicts occur with where tokens are stored when multiple environments are launched on localhost.
It also solves the problem that issue #650 refers to.


Checklist:

  • issue number linked above after pound (#)
    • replace "Closes " with "Contributes to" or other if this PR does not close the issue
  • manually checked my feature / checking not applicable
  • wrote tests / testing not applicable
  • attached screenshots / screenshot not applicable

@FAL-coffee FAL-coffee mentioned this pull request Feb 2, 2024
4 tasks
@phoenix-ru
Copy link
Collaborator

Looks good to me.
@zoey-kaiser OP is right in #650, should we use auth.token and auth.refresh-token as default cookie names instead?

@phoenix-ru phoenix-ru force-pushed the option-to-tokens-cookie-name branch from dbcc5db to e21e13e Compare February 22, 2024 16:45
/**
* It refers to the name of the property when it is stored in a cookie.
*
* @default auth:token
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, change auth:token to auth.token everywhere

src/module.ts Outdated Show resolved Hide resolved
@phoenix-ru
Copy link
Collaborator

@FAL-coffee I have functionally tested your changes. Please, address the review and it can be safely merged.

@FAL-coffee
Copy link
Contributor Author

FAL-coffee commented Feb 22, 2024

@phoenix-ru
I have committed the change to switch the default cookieName's delimiter from ':' to '.'!

@phoenix-ru phoenix-ru merged commit aed6069 into sidebase:main Feb 29, 2024
4 checks passed
@phoenix-ru
Copy link
Collaborator

@FAL-coffee Amazing work

@FAL-coffee FAL-coffee deleted the option-to-tokens-cookie-name branch March 1, 2024 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid Cookie name
3 participants